<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <title>{$title} - <tp:sitename /></title>
    <meta name="keywords" content="{$keywords}" />
    <meta name="description" content="{$description}" />
    <link rel="shortcut icon" href="__PUBLIC__/images/favicon.ico" type="image/x-icon" /> 
    <link rel="stylesheet" href="__PUBLIC__/css/style_version1.css" type="text/css" />
    <link rel="stylesheet" href="__PUBLIC__/css/help.css" type="text/css" />
    <script src="__PUBLIC__/js/jquery.js" type="text/javascript"></script>
    <script type="text/javascript">
	function changeVcode(obj){
		$("#VCode").attr("src",'<tp:vcodeurl />'+ '#'+Math.random());
		return false;
	}
	</script>
</head> 
<body> 

<include file="Public:header" />

<div class="container clearfix">
    <div class="center-pamuban">
        <div class="box content clearfix">
            <div class="heading">
                <h1>申请仿站</h1>
            </div>
            <div class="inner-content"></div>
        <div id="suggest" class="clearfix">
        <div class="pull-right">
            <h2>我们的特色</h2>
            <div class="customer-service">
                <p>1、人工精心仿制。7个工作日内完成仿制，完成后会第一时间通知您！</p>
                <p>2、文件归类。图片放在images文件夹，样式css，特效js，字体fonts</p>
                <p>3、个人中心、需要登录等页面也可仿制</p>
                <p>4、html完美格式化。</p>
                <p>5、0bug。软件采集后，检测并修改bug。</p>
                <p>6、售后服务。若缺少页面或有bug等问题，请直接联系技术人员处理。</p>
            </div>
            <div class="contact-address">
                <div class="title">联系客服</div>
                <div>
                    <a class="qq-chat" target="_blank" href="http://wpa.qq.com/msgrd?v=3&amp;uin=416148489&amp;site=qq&amp;menu=yes">
                        <img src="__PUBLIC__/images/qq-chat.png" alt="QQ在线客服">
                    </a>
                </div>
            </div>
        </div>
        <div class="pull-left">
            <form method="post" action="<tp:gbookaddurl />" name="form">
                <div class="input">
                    <label>网站名称：</label>
                    <input id="name" type="text" name="title" autocomplete="on" value="">
                    <span class="red">*</span>
                </div>
                <div class="input">
                    <label>网站域名：</label>
                    <input id="website" type="text" name="homepage" autocomplete="on" value="">
                    <span class="red">*</span>
                </div>
                <div class="input">
                    <label>手机号：</label>
                    <input id="tel" type="text" name="tel" autocomplete="on" value="">
                </div>
                <div class="input">
                    <label>QQ号：</label>
                    <input id="qq" type="text" name="qq" autocomplete="on" value="">
                </div>
                <div class="input">
                    <label>网站要求：</label>
                    <textarea id="description" name="content" autocomplete="on"></textarea>
                </div>
                
                <if condition="C('CFG_VERIFY_GUESTBOOK') eq 1">
                <div class="input">
                    <label>验证码：</label>
                    <input style="width:175px;" id="code" type="text" name="vcode" autocomplete="on" value="">
                    <img style="vertical-align:middle; height:40px; cursor:pointer;" src="<tp:vcodeurl />" id="VCode" onClick="javascript:changeVcode(this);" />
                </div>
                </if>
                
                <div class="input">
                    <label></label>
                    <input type="hidden" name="username" value="游客" />
                <button class="btn" type="button" id="sub-btn" onclick="checkForm()">提 交</button>
                </div>
            </form>
        </div>
    </div>
    <div class="thanks clearfix hide">
        <div class="icon"></div>
        <div class="verbiage">
            <div class="callout"> 感谢您与我们联系！ </div>
            我们会尽快给你反馈。与此同时，您还可以查看常见问题，在那里或许能找到问题的答案。
        </div>
    </div>
        </div>
    </div>
    

</div>
<script language="javascript">
    function checkForm() {

        var name = $("#name").val();
        if (name == '' || name == '请输入网站名称') {
            alert("请输入网站名称");
            return false;
        }
        var website = $("#website").val();
        if (isUrl(website) == false) {
            alert('网站域名格式有误');
            return false;
        }
		document.form.submit();
        /*$.get(getUrl("Ajax-isLogin"), {}, function(data) {
            if (data.username == null) {
                showWindowBox();
                $("#windown_box").attr('data-func', "checkForm()");
            } else {
                document.form.submit();
            }
        }, "json")*/
    }
    function isUrl(str_url) {
        var strRegex = "^((https|http|ftp|rtsp|mms)?://)"
                + "?(([0-9a-z_!~*'().&=+$%-]+: )?[0-9a-z_!~*'().&=+$%-]+@)?" //ftp的user@
                + "(([0-9]{1,3}\.){3}[0-9]{1,3}" // IP形式的URL- 199.194.52.184
                + "|" // 允许IP和DOMAIN（域名）
                + "([0-9a-z_!~*'()-]+\.)*" // 域名- www.
                + "([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\." // 二级域名
                + "[a-z]{2,6})" // first level domain- .com or .museum
                + "(:[0-9]{1,4})?" // 端口- :80
                + "((/?)|" // a slash isn't required if there is no file name
                + "(/[0-9a-z_!~*'().;?:@&=+$,%#-]+)+/?)$";
        var re = new RegExp(strRegex);
        if (re.test(str_url)) {
            return (true);
        } else {
            return (false);
        }
    }
    function  checkUrl(obj) {
        var url = obj.val();
        if (isUrl(url) == true) {
            obj.css({"border-color": "#ccc"})
        } else {
            obj.css({"border-color": "red"})
        }
    }
   
</script>
<include file="Public:footer" />

</body>
</html>
